<?php
namespace core\lib\drive\log;
use core\lib\conf;
class file
{
	public $path;
	public function __construct(){
		$conf = conf::get('OPTION','log');
		$this->path = $conf['path'];
	}
	public function log($name,$file='log'){
		if(!is_dir($this->path)){
			mkdir($this->path);
		}
		$message = date('Y-m-d H:i:s',time()) . json_encode($name) . PHP_EOL ;
		file_put_contents($this->path.date('Y-m-d-H').$file.'.php',$message,FILE_APPEND);
	}
}